﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XRpgLibrary.TileEngine
{
    public class TileFrame
    {
        #region Field Region
            
        int tileIndex;
        TimeSpan frameDuration;

        #endregion
            
        #region Property Region
            
        public int TileIndex
        {
            get { return tileIndex; }
            set { tileIndex = value; }
        }

        public TimeSpan FrameDuration
        {
            get { return frameDuration; }
            set { frameDuration = value; }
        }
    
        #endregion
            
        #region Constructor Region

        public TileFrame(int tileIndex, TimeSpan frameDuration)
        {
            TileIndex = tileIndex;
            FrameDuration = frameDuration;
        }

        public TileFrame(int tileIndex, double frameDuration)
            : this(tileIndex, TimeSpan.FromSeconds(frameDuration))
        { }

        #endregion

        public TileFrame Clone()
        {
            return new TileFrame(tileIndex, frameDuration);
        }
    }
}
